﻿<!DOCTYPE html>
<!-- 新增/修改活动推广页面 -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>服务区-管理系统</title>
<link rel="stylesheet" type="text/css" href="/MMS/css/DefaultSkin.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/load.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/control.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/page.css?v=1.0" />
<link rel="stylesheet" type="text/css" href="/MMS/css/select2/select2.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/zTreeStyle/zTreeStyle.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/core.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/comm.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/list.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/anim.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/js/plugins/file/uploadify/uploadify.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/js/plugins/treeview/jquery.treeview.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/multi-select.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/js/plugins/bsgrid/bsgrid.all.min.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/js/plugins/bsgrid/bsgrid.all.min.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/jeasy-ui/easyui.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/js/plugins/poshytip/tip-darkgray/tip-darkgray.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/addinfo.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/prettyPhoto.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/jquery-ui-1.10.4.custom.min.css?v=20180828164047090" />
<link rel="stylesheet" type="text/css" href="/MMS/css/jquery.editable-select.min.css?v=20180828164047090" />
<script type="text/javascript" src="/MMS/js/jquery-1.11.2.min.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/browser.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/jquery-ajax.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/jquery-ajax-response-handler.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/securityProtect.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/public-obj.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/bind.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/controls.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/slide.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/switch.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/initial.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/print/printhtml.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/listBox.js?v=20180828164047142"></script>

<script type="text/javascript" src="/MMS/js/plugins/My97DatePicker/WdatePicker.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/file/uploadify/jquery.uploadify.min.js?v=20180828164047142"></script>
<!-- 
<script type="text/javascript" bms:src="@{/js/plugins/file/uploadify/jquery.Huploadify.js}"></script>
-->
<script type="text/javascript" src="/MMS/js/plugins/layer/layer.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/select2/select2.full.min.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/select2/i18n/zh-CN.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/treeview/jquery.treeview.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/form/jquery.form.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/ztree/jquery.ztree.core-3.5.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/ztree/jquery.ztree.excheck-3.5.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/constant.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/common.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/bmsAjax.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/validata.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/validate/jquery.validate.revise.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/validate/localization/messages_zh.min.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/validate/regValidate.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/popup_layer.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/jquery/jquery_magnifier.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/jquery/jquery.multi-select.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/jquery/jquery.quicksearch.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/jquery.easyui.min.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/jquery/jquery.prettyPhoto.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/bsgrid/grid.zh-CN.min.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/bsgrid/bsgrid.all.min.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/bsgrid/grid.extend.min.js?v=20180828164047142"></script>
<script type="text/javascript" charset="UTF-8" src="/MMS/js/plugins/poshytip/jquery.poshytip.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/jquery/jquery-ui-1.10.4.custom.min.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/comm/joinUs/AddListBox.js?v=20180828164047142"></script>
<script type="text/javascript" src="/MMS/js/plugins/jquery/jquery.editable-select.min.js?v=20180828164047142"></script>
<script>
/* <![CDATA[ */
	document.isDebug = false;
	document.domain = location.hostname;
	// 获取验证码
	var _SECURITY_PROTECT_VERIFY_URL = '/MMS/securityProtect/verify.ht';
	var _SECURITY_PROTECT_CHECK_VERIFY_URL = '/MMS/securityProtect/checkverify.ht';
	var _SECURITY_PROTECT_CHECK_ULR = '/MMS/securityProtect/check.ht';
	var _IMG_ERROR_URL = '/MMS/img/u146.png?';
	var _SESSION_LOGO_URL = '';
	
	/*
	var myFlash = function(){
		  if(typeof window.ActiveXObject != "undefined"){
		    return new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
		  }else{
		    return navigator.plugins['Shockwave Flash'];
		  }
		};
	
	alert("flash->" + myFlash());
	*/
	
	$(function() {
		function menuControl() {
			var _options = this.options = {
				openCls : "active_subopen",// 展开子列表后菜单盒子的class名
				disableCls : "active_subdisable",// 展开子列表后菜单盒子的class名
				menuWarpCls : "content",
				menuSmall : "menu-small"
			};
			this.menuBox = $(".grid-s5m0");
			this.menuWarp = $("#" + _options.menuWarpCls);
			this.menuSmallBtn = this.menuBox.find(".menu-small-btn");
			this.menuBoxList = $(".menu-box-list .dd-item");
			this.menuIndex = $(".menu-box-list .dd-index");
			this.submenuOpenBtn = this.menuBox.find(".submenu-open");
			this.subMenuBox = this.menuBox.find(".dd-inner");
			this._userState = false;
			this._hide();
			this._menuBig();
			this._disable();
			this._bind();
		}
		menuControl.prototype = {
			_resize : function() {
				var _this = this, win = $(window), count = 5;
				// $(window).resize();
				_this._timeout && clearTimeout(_this._timeout);
				function wresize() {
					win.resize();
					count--;
					if (count > 0) {
						_this._timeout && clearTimeout(_this._timeout);
						_this._timeout = setTimeout(function() {
							wresize();
						}, 100);
					}
				}
				wresize();
			},
			/**
			 * 隐藏菜单
			 */
			_hide : function() {
				var _this = this, _tempOption = this.options;
				_this._state = false;
				// _this.menuBox.css({"width":"0px"});
				_this.menuBox.removeClass(_tempOption.disableCls);
				_this.menuBox.removeClass(_tempOption.openCls);
				_this._resize();
			},
			_disable : function() {
				var _this = this
				_tempOption = this.options;
				_this.menuBox.addClass(_tempOption.disableCls);
				_this.menuBox.removeClass(_tempOption.openCls);
				_this._resize();
			},
			/**
			 * 打开菜单
			 */
			_open : function() {
				var _this = this, _tempOption = this.options;
				_this._state = true;
				// _this.menuBox.css({"width":"180px"});
				_this.menuBox.removeClass(_tempOption.disableCls);
				_this.menuBox.addClass(_tempOption.openCls);
				_this._resize();
			},
			/**
			 * 最小化菜单
			 * 
			 * @private
			 */
			_menuSmall : function() {
				var _this = this, _tempOption = this.options;
				_this._menuState = false;
				_this.menuWarp.addClass(_tempOption.menuSmall);
				_this._resize();
			},
			/**
			 * 最大化菜单
			 * 
			 * @private
			 */
			_menuBig : function() {
				var _this = this, _tempOption = this.options;
				_this._menuState = true;
				_this.menuWarp.removeClass(_tempOption.menuSmall);
				_this._resize();
			},
			_bind : function() {
				var _this = this;
				_this.menuSmallBtn.bind("click", function() {
					if (_this._menuState) {
						_this._userState = false;
						_this._menuSmall();
					} else {
						_this._userState = true;
						_this._menuBig();
					}
				});
				_this.submenuOpenBtn.bind("click", function() {
					if (_this._state) {
						_this._hide();
					} else {
						_this._open();
					}
				});
				_this.menuIndex.bind("click", function() {
					_this._disable();
				});
				_this.menuBoxList.bind("click", function() {
					if (!_this._userState) {
						_this._menuSmall();
					}
					_this._open();
				});
			}
		};
		new menuControl();
		function SetScroll() {
			this._bind();
		}
		SetScroll.prototype = {
			/**
			 * 添加事件方法
			 * 
			 * @param {function}
			 *            fn 事件调用的方法
			 * @param {Node}
			 *            node 事件需要操作的节点
			 */
			addEvent : function(fn, node) {
				if (fn && $.isFunction(fn)) {
					this.eventList = this.eventList || [];
					this.eventList.push({
						fn : fn,
						node : node
					});
				}
			},
			/**
			 * 事件触发时执行的事件
			 */
			triggerEvt : function() {
				var _this = this, bodyscrollTop = _this._getScrollNode();
				_this.eventList && $.each(_this.eventList, function() {
					this.fn(bodyscrollTop.scrollTop, this.node);
				});
			},
			/**
			 * 获取支持scrollTop的元素
			 * 
			 * @protected
			 * @returns {Node} 返回支持Dom节点scrollTop的元素
			 */
			_getScrollNode : function() {
				return document.documentElement && document.documentElement.scrollTop ? document.documentElement : document.body;
			},
			/**
			 * 绑定事件
			 * 
			 * @protected
			 */
			_bind : function() {
				var _this = this;
				$(window).bind("scroll", function() {
					_this.triggerEvt();
				});
			}
		};
		var scroll = new SetScroll(), // 滚动条对象
		menuBox = $(".menu-box"), ddinner = $(".dd-inner");// 子菜单列表盒子
		scroll.addEvent(function(scrollTop, scrolla) {
			var top = 50 - scrollTop;
			if (top <= 0) {
				top = 0;
			}
			scrolla.css({
				top : top
			});
			ddinner.css({
				top : top
			});
		}, $(".menu-box"));
		// $(".grid-s5m0 .main-wrap").css({"margin-left":"360px"});
		$("img").error(function() {// 图片加载错误
			$(this).attr("src", _IMG_ERROR_URL);// 设置默认图片
		});
		var imgUrl = _SESSION_LOGO_URL;
		$("#menu_tree").bind('click', function(event) {
			if (event.target.className.indexOf("hitarea") > -1) {
				if (YW.newobj) {
					if (YW.newobj.leftheigth) {
						YW.newobj.leftheigth.setSize();
					}
				}
			}
		})
		$(".item-hd,.dd-nav").bind('click', function() {
			if (YW.newobj) {
				if (YW.newobj.leftheigth) {
					YW.newobj.leftheigth.setSize();
				}
			}
		})
	});
	function clearList() {
		$(".icip_pull_item").each(function() {
			$(this).removeClass("icip_button_c2");
		});
	}
	$(function() {
		$(".icip_pull_item").click(function() {
			clearList();
			var pageSize = $(this).attr("name");
			$(this).addClass("icip_button_c2");
			$("#pageSize").val(pageSize);
			go($("#pagenumber").html());
		});
		// 展开更多
		(function() {
			$(".icip_btn_more").delegate(".icip_more_show", "mouseover", function() {
				$(this).parents('.icip_btn_more').addClass("icip_active");
			});
			$(".icip_btn_more").on("mouseout", function(evt) {
				if (!$(this).find(evt.relatedTarget)[0]) {
					$(this).removeClass("icip_active");
				}
			});
		})();
	});
/*]]>*/
</script>
</head>
<script type="text/javascript" src="/MMS/js/promo/edit.js?v=20180828164047142"></script>
<body class="bgcolor-body">
	<div>
	<div class="cont-box icip_skin_box">
		<div>
	<script type="text/javascript" src="/MMS/js/breadCrumbNavigation/navigation.js?v=20180828164047142"></script>
	<div class="cur-position"></div>
</div>
		<div class="list-table icip_content_box">
			<div>
	<div class="icip_title_box">
		<div class="left">
			<span class="icip_title_text">新增活动推广</span>
			
			<span class="icip_button" onclick="returnBack();">返回上级</span>
		</div>
	</div>
</div>
			<div class="list-table-cont">
				<div class="table6">
					<form method="post" id="frm" name="frm" target="right" action="/MMS/promoEdit/savePromo.ht">
						<input type="hidden" name="web_token" value="9310a4c8-ce18-40b7-92fb-bba0e257f51b" />
						<input type="hidden" name="promotionId" id="promotionId" value="" />
						<input type="hidden" name="isSelectMuBan" id="isSelectMuBan" />
						<table class="form-table" style="wmargin-top: 26px; *margin-top: 0; width: 80%; border: 0; margin-left: 5%;">
							<tr id="rangeDiv">
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>发布产品：</span>
										</div>
										<div class="td2">
											
											<div class="control-css3select css3select-icon-hide" id="controlId">
												<select id="softIdenty" name="softIdenty" onchange="changeSelect()">
													<option></option>
													<option value="PAYMENT">业主贝贝</option>
													<option value="CHARGE">物业贝贝</option>
												</select>
											</div>
										</div>
										
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>活动类型：</span>
										</div>
										<div class="td2">
											<div class="control-css3select css3select-icon-hide">
												<select id="promotionType" name="promotionType">
													<option></option>
												</select>
											</div>
											
										</div>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>活动标题：</span>
										</div>
										<div class="td2">
											<span>
												<input type="text" maxlength="50" class="input" name="promotionTitle" id="promotionTitle" required="required" placeholder="请输入活动标题" value="" />
											</span>
										</div>
									</div>
								</td>
							</tr>
							<tr id="isCustmubanDiv" style="display: none;">
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>是否自定义模板：</span>
										</div>
										<div class="td2">
											<input type="radio" name="isCustMuBan" id="noCust" onclick="isCust(&#39;0&#39;);" value="0" />
											否
											<input type="radio" name="isCustMuBan" id="yesCust" onclick="isCust(&#39;1&#39;);" value="1" />
											是
										</div>
									</div>
								</td>
							</tr>
							<tr id="mubanDiv">
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>模板：</span>
										</div>
										
										<div class="td2">
											<div class="control-css3select css3select-icon-hide">
												<select id="moudleId" name="moudleId">
													<option></option>
													
													
													
													
													
													
													
													
													
													
													
													
													
													
													
													
													<option value="TEM2015100800000001">摇一摇抽奖</option>
													<option value="TEM2015100800000002">缴费软件物业缴费功能界面</option>
													<option value="TEM2015100800000002">缴费软件物业缴费功能界面</option>
													<option value="TEM2015100800000003">缴费软件缴纳车位费功能界面</option>
													<option value="TEM2015100800000003">缴费软件缴纳车位费功能界面</option>
													<option value="TEM2015100800000004">缴费软件缴纳水费功能界面</option>
													<option value="TEM2015100800000004">缴费软件缴纳水费功能界面</option>
													<option value="TEM2015100800000005">缴费软件缴纳电费功能界面</option>
													<option value="TEM2015100800000005">缴费软件缴纳电费功能界面</option>
													<option value="TEM2015100800000006">缴费软件缴纳燃气费功能界面</option>
													<option value="TEM2015100800000006">缴费软件缴纳燃气费功能界面</option>
													<option value="TEM2015100800000007">活动详情</option>
													<option value="TEM2015100800000007">活动详情</option>
													<option value="TEM2015100800000007">活动详情</option>
													<option value="TEM2015100800000007">活动详情</option>
													<option value="TEM2015100800000008">摇一摇，好运到</option>
												</select>
											</div>
										</div>
									</div>
								</td>
							</tr>
							<tr id="isCustNameDiv" style="display: none;">
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>模板名称：</span>
										</div>
										<div class="td2">
											<input type="hidden" name="custmoudleId" id="custmoudleId" value="" />
											<input type="text" name="custmoudleName" id="custmoudleName" maxlength="200" value="" />
											<span class="red">请输入链接地址</span>
										</div>
									</div>
								</td>
							</tr>
							<tr id="isCustDescDiv" style="display: none;">
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>模板备注：</span>
										</div>
										<div class="td2">
											<input type="text" name="custmoudleDesc" id="custmoudleDesc" maxlength="200" value="" />
										</div>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>适用范围：</span>
										</div>
										<div class="td2">
											<div class="control-css3select css3select-icon-hide">
												<select id="target" name="target" onchange="showCompanyOrcomm();">
													<option></option>
												</select>
											</div>
											
										</div>
									</div>
								</td>
							</tr>
							<tr id="villageDiv" style="display: none;">
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>小区名称：</span>
										</div>
										<div class="td2">
											<input type="hidden" name="plotNo" id="plotNo" value="" />
											<input onclick="showCompanyOrcomm()" type="text" class="input" name="plotName" id="plotName" readonly="readonly" value="" />
										</div>
									</div>
								</td>
							</tr>
							<tr id="companyDiv" style="display: none;">
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>公司名称：</span>
										</div>
										<div class="td2">
											<input type="hidden" name="pcid" id="pcid" value="" />
											<input onclick="showCompanyOrcomm()" type="text" class="input" name="companyName" id="companyName" readonly="readonly" value="" />
										</div>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>有效日期：</span>
										</div>
										<div class="td2">
											<input type="text" id="startDate" name="startDate" readonly="readonly" class="Wdate" size="13" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;,readOnly:true,minDate:&#39;%y-%M-%d&#39;,maxDate:&#39;#F{$dp.$D(\&#39;endDate\&#39;)}&#39;})" value="" />
											————
											<input type="text" id="endDate" name="endDate" readonly="readonly" class="Wdate" size="13" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;,readOnly:true,minDate:&#39;#F{$dp.$D(\&#39;startDate\&#39;)}&#39;})" value="" />
										</div>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span id="mainPicture">活动主题图片（640*360请上传png格式）：</span>
										</div>
										<div class="td2">
											
											<div>
												<div id="uploadifyButton"></div>
												<input type="hidden" id="tempFileName" name="tempFileName" />
											</div>
											<!-- 
											<div data-bind="{'evt':'mouseover','fun':'layer.tips(\'点击上传图片\', \'#uploadifyButton-button\')'}">
												<div>
													<input type="hidden" name="largePic" id="largePic" th:value="${'$'}result} == null ? '' : ${'$'}result.largePic}" />
												</div>
												<div id="fileQueue" class="fileUpload">
													<input type="file" name="upFile" id="uploadifyButton" style="height: 640px; width: 360px;" />
												</div>
												<input type="hidden" value="" id="tempFileName" name="tempFileName" />
											</div>
											-->
										</div>
									</div>
								</td>
							</tr>
							<tr id="pictureDiv">
								<td>
									<div class="left">
										<div class="td1">
											<span class="red">*</span>
											<span>推广位广告（640*100请上传png格式）：</span>
										</div>
										<div class="td2">
											
											<div>
												<div id="uploadifyButton2"></div>
												<input type="hidden" id="tempFileName2" name="tempFileName2" />
											</div>
											<!-- 
											<div data-bind="{'evt':'mouseover','fun':'layer.tips(\'点击上传图片\', \'#uploadifyButton2-button\')'}">
												<div>
													<input type="hidden" name="smallPic" id="smallPic" th:value="${'$'}result} == null ? '' : ${'$'}result.smallPic}" />
												</div>
												<div id="fileQueue2" class="fileUpload">
													<input type="file" name="upFile2" id="uploadifyButton2" style="height: 600px; width: 100px;" />
												</div>
												<input type="hidden" value="" id="tempFileName2" name="tempFileName2" />
											</div>
											 -->
										</div>
									</div>
								</td>
							</tr>
							<tr>
								<td>
									<div class="left">
										<div class="td1">
											<span>活动内容：</span>
										</div>
										<div class="td2">
											<span>
												<textarea rows="5" cols="50" oninput="tishi()" onpropertychange="tishi()" id="promotionContent" name="promotionContent"></textarea>
											</span>
										</div>
									</div> <span id="tishi" class="red"></span>
								</td>
							</tr>
							<tr>
								<td>
									<div class="left">
										<div class="td1">
											<span>活动规则：</span>
										</div>
										<div class="td2">
											<span>
												<textarea rows="5" cols="50" oninput="rule()" onpropertychange="rule()" id="promotionRule" name="promotionRule"></textarea>
											</span>
										</div>
									</div> <span id="rule" class="red"></span>
								</td>
							</tr>
							<tr>
								<table id="cjTable" cellpadding="0" cellspacing="0" class="form-table" style="wmargin-top: 26px; *margin-top: 0; width: 80%; border: 0; margin-left: 5%; display: none;">
									<tr>
										<td>
											<div class="left">
												<div class="td1">
													<span class="red">*</span>
													<span>中奖次数限制：</span>
												</div>
												<div class="td2">
													<input id="dailyWinTime" type="number" name="dailyWinTime" class="input" oninput="if(value.length&gt;2)value=value.slice(0,2)" value="" />
												</div>
												<div class="td3" style="width: 80px;">
													<div class="control-css3select item-box-p1 css3select-icon-hide">
														<select name="winTimesType" class="m-select" id="winTimesTypeSelect">
															<option></option>
															<option value="01">次/每天</option>
															<option value="02">次/永久</option>
														</select>
													</div>
												</div>
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="left">奖品设置</div>
											<div class="td2">
												<span class="error">
													<button type="button" class="button" style="width: 80px;" onclick="openSelectPrize()">增加奖品</button>
												</span>
											</div>
										</td>
									</tr>
									<tr>
										<div>
	<table id="addjpTable" style="display: none; width: 880px; margin-left: 50px;">
		<tr class="th">
			<td>奖品名称</td>
			<td>奖品类型</td>
			<td>奖品数量</td>
			<td>操作</td>
		</tr>
		<tr id="model" style="display: none" border="1px">
			<td name="prizeName"></td>
			<td name="prizeType"></td>
			<td name="prizeCount"></td>
			<td><span onclick="delTr(this)">删除</span></td>
		</tr>
		
	</table>
</div>
									</tr>
								</table>
							</tr>
						</table>
						<div>
	<div style="text-align: center;" data-control-type="button" data-control-config="{&#39;buttonCls&#39;:&#39;button&#39;}">
		<span id="savespan">
			<input id="saveuser" value="保存" type="button" onclick="saveUserSubmit();" class="button-save" />
		</span>
	</div>
</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
	<div>
		<div id="_proccesBar" class="JsW keypayment" data-position-type="fixed" data-position-config="{}" data-widget-type="popup" data-widget-config="{&#39;contentId&#39;:true,&#39;contentCls&#39;:&#39;ks-load&#39;}" style="display: none;">
			<div class="JsW load-box" id="ks-load" data-size-type="widescreen">
				<div class="JsW bg alpha30"></div>
				<div class="JsW load-pop-box" data-align-type="align" data-align-config="{&#39;lframe&#39;:&#39;ks-load&#39;}">
					<!-- <i class="ks-pop-close">X</i> -->
					<img class="rotate" src="/MMS/img/loading.png" />
				</div>
			</div>
			<div class="ks-pop-nav"></div>
		</div>
		<div id="_proccesBar_no_close" class="JsW keypayment" data-position-type="fixed" data-position-config="{}" data-widget-type="popup" data-widget-config="{&#39;contentId&#39;:true,&#39;contentCls&#39;:&#39;ks-load&#39;,&#39;keyCode&#39;:[]}" style="display: none;">
			<div class="JsW load-box" id="ks-load" data-size-type="widescreen">
				<div class="JsW bg alpha30"></div>
				<div class="JsW load-pop-box" data-align-type="align" data-align-config="{&#39;lframe&#39;:&#39;ks-load&#39;}">
					<!-- <i class="ks-pop-close">X</i> -->
					<img class="rotate" src="/MMS/img/loading.png" />
				</div>
			</div>
			<div class="ks-pop-nav"></div>
		</div>
		<div class="modal-box" id="ks-pop-box-pwd" align="center">
			<div class="JsW bg alpha60" data-position-type="fixed" data-size-type="widescreen"></div>
			<div class="pop-box JsW" data-align-type="align" data-align-config="{&#39;vertical&#39;:false,&#39;offset&#39;:[120,0]}">
				<form method="post" id="__changePwd" action="/MMS/changePwd.ht">
					<input type="hidden" name="web_token" value="9310a4c8-ce18-40b7-92fb-bba0e257f51b" />
					<div class="pop-box-hd">
						修改登录密码 <i class="ks-pop-close2" onclick="closeDialog(&#39;ks-pop-box-pwd&#39;)">X</i>
					</div>
					<div class="pop-box-bd">
						<table>
							<tr>
								<td align="right">
									<div>
										<span class="require">*</span>
										<span>原密码：</span>
									</div>
								</td>
								<td>
									<div>
										<span>
											<input type="password" class="input" id="oldPassword" name="oldPassword" placeholder="请输入旧密码" />
										</span>
									</div>
								</td>
							</tr>
							<tr>
								<td align="right">
									<div>
										<span class="require">*</span>
										<span>新密码：</span>
									</div>
								</td>
								<td>
									<div>
										<span>
											<input type="password" class="input" id="newPassword" maxlength="20" name="newPassword" placeholder="请输入新密码" />
										</span>
									</div>
								</td>
							</tr>
							<tr>
								<td align="right">
									<div>
										<span class="require">*</span>
										<span>确认密码：</span>
									</div>
								</td>
								<td>
									<div>
										<span>
											<input type="password" class="input" maxlength="20" id="checkPassword" name="checkPassword" placeholder="再次输入新密码" />
										</span>
									</div>
								</td>
							</tr>
						</table>
					</div>
					<div class="pop-box-ft">
						<div class="redbutton control-button JsW">
							<span>
								<input type="button" value="确定" onclick="changePwd(&#39;ks-pop-box-pwd&#39;,&#39;__changePwd&#39;)" class="button" />
							</span>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<div>
	<script type="text/javascript">
	/* <![CDATA[ */
		var __html5_upload_div_id_count = 0;
		$.fn.extend({
			html5Upload : function(option) {
				var formId = 'html5_upload_' + __html5_upload_div_id_count++;
				var _this = $(this);
				_this.html5_option = option;
				_this.prop('html5_upload_form_id', formId);
	
				var _default = {
					css : {
						width : '180px',
						height : '140px',
						border : '1px solid #ccc',
						padding : '2px 2px 2px'
					},
					showFilePath : true, // 是否在图片下方显示文件地址
					fileTypeExts : [],
					onSelect : function(file) {
						// 选择文件后执行。参数：选择的文件对象
					},
					onUploadSuccess : function(data) {
						// 上传成功后执行
					},
					onUploadError : function() {
						// 上传失败后执行
					},
					onUploadComplete : function() {
						// 上传完成后执行
					}
				};
	
				option = $.extend(_default, option);
	
				// 1 在BODY中加入一个隐藏的div.
				var _$hideDiv = $('<div></div>');
				_$hideDiv.hide();
				$('body').append(_$hideDiv);
	
				// 2 这个div中加入一个form
				var _$form = $("<form></form");
				_$form.attr('id', formId);
				_$form.attr('action', option.url);
				_$form.attr('method', 'post');
				_$form.attr('enctype', 'multipart/form-data');
				_$hideDiv.append(_$form);
	
				// 4 获取上传按钮，将按钮移到隐藏的div中的form里
				// var _$fileBtn = _this.find('input[type="file"]');
				var _$fileBtn = $("<input type='file' name='uploadfile' />");
				_$form.append(_$fileBtn);
	
				// 5.应用样式
				_this.empty();
				_this.css(option.css);
				// 展示文件图片
				var _fileImg = $("<div style='width:100%;height:100%;'></div>");
				_this.append(_fileImg);
				// 文件名称
				var _fileName = $("<div></div>");
				_this.append(_fileName);
	
				// 检测有没有设置默认图片
				var defaultSrc = _this.attr('src') || option.src;
				if (defaultSrc) {
					_fillInFile(getUploadedImg(defaultSrc));
				} else {
					_fillInFile(getPrepairImg());
				}
	
				// 6 点击显示DIV时，触发上传按钮的点击事件
				_this.unbind('click');
				_this.bind('click', function() {
					if (_this.STATUS == 'RUNNING') {
						if (document.isDebug) {
							console.log('正在上传中');
						}
						return false;
					}
					_$fileBtn.trigger('click');
				});
	
				// 7 文件选择成功后,触发隐藏div中的form事件
				_$fileBtn.bind('change', function() {
					_this.STATUS = 'RUNNING';
	
					var filename = _$fileBtn.val();
	
					var onSelectFuncResult;
					if (filename) {
						// 检测文件名
						if (!_checkFileExts(filename)) {
							_reset();
							_this.STATUS = 'COMPLETE';
							return false;
						}
	
						var file = _$fileBtn.val();
						onSelectFuncResult = option.onSelect(file);
					} else {
						_reset();
						_this.STATUS = 'COMPLETE';
						return false;
					}
	
					// 如果 onSelect返回false,则不再继续
					if (onSelectFuncResult != undefined && !onSelectFuncResult) {
						// 重置file输入框
						_reset();
						_this.STATUS = 'COMPLETE';
						return false;
					}
	
					_fillInFile(getUploadingImg());
	
					// 选择完成后，上传文件
					$.submit(_$form, {
						dataType : 'json',
						success : function(data) {
							// 返显
							_fillInResult(data);
	
							// 回调
							var func;
							if (option.onUploadSuccess) {
								func = option.onUploadSuccess;
								func(data, filename.substring(filename.lastIndexOf("\\") + 1));
							}
						},
						error : function() {
							// 上传失败，重新等待上传
							_fillInFile(getPrepairImg());
	
							var func;
							if (option.onUploadError) {
								func = option.onUploadError;
								func();
							}
						},
						complete : function() {
							// 重置file输入框
							_reset();
							_this.STATUS = 'COMPLETE';
	
							var func;
							if (option.onUploadComplete) {
								func = option.onUploadComplete;
								func();
							}
						}
					});
				});
	
				/**
				 * 清空上传文件按钮的内容,防止两次上传同一文件时，无法监听到文件改变
				 */
				function _reset() {
					_$fileBtn.val('');
				}
	
				/**
				 * 填充图片到div中
				 */
				function _fillInFile(url) {
					if (url) {
						if(url.indexOf('?') == -1 ){
							url += '?v=' + new Date().getTime();
						}else{
							url += '&v=' + new Date().getTime();
						}
						_fileImg.empty();
						var img = $('<img style="width:100%;height:100%;"/>');
						img.attr('src', url);
						_fileImg.append(img);
					}
				}
	
				function _checkFileExts(filename) {
					var fileTypeExts = option.fileTypeExts;
					if (fileTypeExts && fileTypeExts.length > 0) {
						for ( var i in fileTypeExts) {
							var fileTypeExt = $.trim(fileTypeExts[i]);
							var reg = new RegExp(fileTypeExt + "$");
							if (reg.test(filename)) {
								return true;
							}
						}
						_alert("允许上传文件类型:" + _arrarToString(fileTypeExts));
						return false;
					} else {
						return true;
					}
				}
	
				/**
				 * 将上传结果返显到DIV中
				 */
				function _fillInResult(data) {
					if (data && data.result) {
						var pic = data.result;
						if (pic) {
							var url = getUploadedImg(pic);
							_fillInFile(url);
						}
					}
				}
	
				/**
				 * 返回等待上传的图标
				 */
				function getPrepairImg() {
					var imgUrl = '/MMS/js/plugins/file/html5Upload/img/waitUpload.png';
					return  imgUrl;
				}
	
				/**
				 * 返回上传中的图标
				 */
				function getUploadingImg() {
					var imgUrl = '/MMS/js/plugins/file/html5Upload/img/loading.gif';
					return imgUrl;
				}
	
				function getUploadedImg(url) {
					if (url) {
						var lowerurl = (url + '').toLowerCase();
						// 如果url不是http://开始的网络地址，则返回一个文件的图标
						if (!(lowerurl.indexOf("http://") != -1 || lowerurl.indexOf("https://") != -1)) {
							var imgUrl = '/MMS/js/plugins/file/html5Upload/img/file.png';
							return imgUrl;
						}
	
						var imgReg = new RegExp('[.png$]|[.gif$]|[.jpg$]|[.jpeg$]');
						// 如果url是一个图片，则返回该url.否则返回一个文件的图标
						if (imgReg.test(lowerurl)) {
							return url;
						} else {
							var imgUrl = '/MMS/js/plugins/file/html5Upload/img/file.png';
							return imgUrl
						}
					} else {
						var imgUrl = '/MMS/js/plugins/file/html5Upload/img/waitUpload.png';
						return imgUrl;
					}
				}
	
				function _arrarToString(array) {
					var str;
					if (array) {
						for ( var i in array) {
							if (str) {
								str += ' | ';
							} else {
								str = ' ';
							}
							str += array[i];
						}
					}
					return str ? str : ' ';
				}
	
			}
		});
	/*]]>*/
	</script>
</div>
</body>
<script>
/*<![CDATA[*/
	var cid = '';
	var comId = '';
	var promotionId = '';
	var flagEdit = '';
	var result = {'custmoudleDesc':null,'custmoudleId':null,'custmoudleName':null,'dailyWinTime':null,'endDate':null,'endTime':null,'imgUrl':null,'isTop':null,'isTs':null,'largePic':null,'moudleId':null,'promotionContent':null,'promotionId':null,'promotionRule':null,'promotionTitle':null,'promotionType':null,'pubOrgNo':null,'publishFlag':null,'pushChannelType':null,'smallPic':null,'softIdenty':null,'startDate':null,'startTime':null,'tsendDate':null,'tsstartDate':null,'type':null,'updateTime':null,'winTimesType':null};
	var userType = '2';
	var superAdmin = '0';
	var plantform = null;
	var result = {'custmoudleDesc':null,'custmoudleId':null,'custmoudleName':null,'dailyWinTime':null,'endDate':null,'endTime':null,'imgUrl':null,'isTop':null,'isTs':null,'largePic':null,'moudleId':null,'promotionContent':null,'promotionId':null,'promotionRule':null,'promotionTitle':null,'promotionType':null,'pubOrgNo':null,'publishFlag':null,'pushChannelType':null,'smallPic':null,'softIdenty':null,'startDate':null,'startTime':null,'tsendDate':null,'tsstartDate':null,'type':null,'updateTime':null,'winTimesType':null};
	var villageMap = null;
	var companyBase = null;
	var imgUrl = null;
	var hdSize = 5;
	var moudleMapSize = 16;
	var fileUploadUrl = 'https://www.fuwuqu.com/ifs/' + null + "L" + null + ".png";
	var fileImgUrl = 'https://www.fuwuqu.com/ifs/' + null + "S" + null + ".png";
/*]]>*/
</script>
</html>